package io.renren.dao;

import io.renren.entity.Connect;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DemoDao {

    @Insert("insert into connect (msg,createTime) values (#{msg},now())")
    public void save(String msg);

    @Select("select * from connect order by  createTime DESC")
    List<Connect> getConnctList();
}
